<script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script>

<form action="" method="post">

	<ul class="jt-tabs"><?
	
		foreach($DATA['langs'] as $lang) {
			?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
		} 
		
	?></ul>
	
	<div class="jt-panes">
	
		<? $t = true; 
			foreach($DATA['langs'] as $lang) { $l = $lang['text'];
	
			?><div class="jt-pane" style="<?=$t ? "display:block" : ""?>">
	
				<p><label>Invite mail subject<br />
					<span class="description">The <strong>{name}</strong> tag will be replaced with the contents of the Your Name field of the invitation form</span><br />
					<input type="text" class="wide" name="inv_subject[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'inv_subject')?>" />
				</label></p>

				<p><label>Invite mail body <br />
					<span class="description">The <strong>{note}</strong>, <strong>{name}</strong>, <strong>{friend name}</strong> tags can be used</span><br />
					<textarea name="inv_body[<?=$l?>]" class="wide" ><?=dat('settings', 'data', $l, 'inv_body')?></textarea>
				</label></p>

				<p><label>Invite administrator's name <span class="description">(for the “<strong>Reply to</strong>” field of the invite mail)</span>
					<input type="text" class="wide" name="adm_name[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'adm_name')?>" />
				</label></p>

				<p><label>Invite form caption<br />
					<span class="description">The <strong>{form}</strong> tag will be replaced with the invitation form</span><br />
					<textarea name="caption[<?=$l?>]" class="wide" ><?=dat('settings', 'data', $l, 'caption')?></textarea>
				</label></p>

				<p><label>Invite form “Your Name” field caption
					<input type="text" class="wide" name="form_name[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'form_name')?>" />
				</label></p>
			
				<p><label>Invite form “Your Friend's Name” field caption
					<input type="text" class="wide" name="form_friend_name[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'form_friend_name')?>" />
				</label></p>

				<p><label>Invite form “Your Friend's Mail” field caption
					<input type="text" class="wide" name="form_friend_mail[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'form_friend_mail')?>" />
				</label></p>

				<p><label>Invite form “Note” field caption
					<input type="text" class="wide" name="form_note[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'form_note')?>" />
				</label></p>

				<p><label>Invite form “Send” button caption
					<input type="text" class="wide" name="form_send[<?=$l?>]" value="<?=hdat('settings', 'data', $l, 'form_send')?>" />
				</label></p>
	
			</div><? 
		
		$t = false; } ?>
	
	</div>
	
	<fieldset>
		<legend> Invite processing data </legend>
	
			<p><label>Form administrator's address (for the From field of the invite mail)
				<input type="text" name="adm_address" class="wide" value="<?=hdat('settings', 'adm_address')?>">
			</label></p>

			<p><label>Form check number
				<input type="text" name="check" class="wide" value="<?=hdat('settings', 'check')?>">
			</label></p>
	
	</fieldset>

	<p><input type="submit" name="editor_save" value="Save" /></p>

</form>
